function validate123(formObj){

  if(formObj.uname.value == ""){
    alert("Please enter name");
    oUname.focus();
    return false;
  } else
  if(formObj.uname.value.length < 6){
    alert("Name should be 6 char long");
    oUname.focus();
    oUname.select();
    return false;
  } else
  if(formObj.hiddenGender.value ==""){
    alert("Please select gender");
    return false;
  } else
  return true;
} //end validate()


function validate(formObj){
  var oHobbies = document.getElementsByName('hobbies[]');
  var numOfCheckBox = oHobbies.length;
  var minCheck = 2;
  var count = 0;
  //alert(numOfCheckBox)
  for(var i=0 ; i<numOfCheckBox ; i++){
    var isCheck = oHobbies[i].checked;
    if(isCheck == true){
      count++;
    }
  }///end for

  if(count < minCheck){
    alert("Please select atleast "+minCheck+" hobbies");
    return false;
  }///end if

}///end validate
